<?php

class AdminLogService {

	public  $dbutil;
	function __construct($dbutil){
		$this->dbutil =  $dbutil;
	}
	
	public function addLog($data) {
		return $this->dbutil->insert ( "admin_log", $data );
	}
	
	public function countNum() {
		$sql = "select count(id) countnum from admin_log";
		$resutrnarry = $this->dbutil->get_results ( $sql );
		return $resutrnarry [0]->countnum;
	}
    public function logInfo($userId,$logType,$logDesc){
        $sql = "insert into admin_log(admin_id,log_type,log_desc,log_time) values ('$userId','$logType','$logDesc',sysdate())";

        $this->dbutil->query($sql);
    }

}

?>